package com.juicygames.shmup.badguy;

import android.graphics.Color;
import android.graphics.Rect;

import com.juicygames.framework.draw.DrawDepth;
import com.juicygames.framework.draw.drawservice.DrawService;
import com.juicygames.framework.gamepart.GameEntity;
import com.juicygames.framework.gamepart.GamePart;
import com.juicygames.framework.property.space.CollisionBoundingBox;
import com.juicygames.framework.property.space.ColorProperty;
import com.juicygames.framework.property.space.Position;
import com.juicygames.framework.property.space.Velocity;
import com.juicygames.shmup.player.DrawHandler;
import com.juicygames.shmup.player.Mover;

public class BadGuy extends GameEntity {
	
	private static final int COLOR = Color.RED;
	private static final int DRAW_DEPTH = 8;
	
	public void load() {
		
		addPart(new Position(150, 300));
		addPart(new Velocity());
		addPart(new Mover());
		
		addPart(new CollisionBoundingBox(new Rect(0,0,50,50)));
		
		DrawHandler drawHandler = addPart(new DrawHandler());
		
		addPart(new ColorProperty(COLOR));
		
		addPart(new DrawDepth(DRAW_DEPTH));
		GamePart world = getWorld();
		world.getPart(DrawService.class).register(drawHandler);
		
	}

}
